import React from 'react';
import { Layout, Table, Typography } from 'antd';

const { Content } = Layout;
const { Title } = Typography;

const Exam = () => {
  // 假设这是从后端获取到的学员考试成绩数据
  const dataSource = [
    {
      key: '1',
      studentName: '张三',
      examDate: '2024-04-10',
      subject: '科目一',
      score: 95,
    },
    {
      key: '2',
      studentName: '张三',
      examDate: '2024-04-21',
      subject: '科目二',
      score: 90,
    },
    // 其他学员数据...
  ];

  // 表格列配置
  const columns = [
    {
      title: '学员姓名',
      dataIndex: 'studentName',
      key: 'studentName',
    },
    {
      title: '考试日期',
      dataIndex: 'examDate',
      key: 'examDate',
    },
    {
      title: '科目',
      dataIndex: 'subject',
      key: 'subject',
    },
    {
      title: '成绩',
      dataIndex: 'score',
      key: 'score',
    },
  ];

  return (
    <Layout style={{ minHeight: '100vh' }}>
      <Content style={{ padding: '50px' }}>
        <Title level={2}>学员考试成绩</Title>
        <Table dataSource={dataSource} columns={columns} />
      </Content>
    </Layout>
  );
};

export default Exam;